using System;
using System.Collections.Generic;
using System.Text;
using CMS.Core.DataInterfaces;
using CMS.Core.Domain;
using CMS.Presenters.Views.Template;
using CMS.Data;

namespace CMS.Presenters.Presenters.Template
{
    public class BaiVietListPresenter
    {
        private IBaiVietListView view;
        private IBaiVietDao objDao;

        public BaiVietListPresenter(IBaiVietListView view, IBaiVietDao objDao)
        {
            this.view = view;
            this.objDao = objDao;
        }

        public void GetAllBaiVietWithArticle(int MaTheLoai)
        {
            this.view.LstBaiViet = this.objDao.GetAllWithMoreFieldsAndOderBy(true, new string[] { "MaTheLoaiLookup", "TrangThai" },
                new object[] { new BaiVietTheLoaiDao().GetById(MaTheLoai), true }, new string[] { "NgayCapNhat","ID" }, false);
        }       
    }
}
